package org.example.campsys.service;

import org.example.campsys.mapper.TeacherMapper;
import org.example.campsys.model.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class TeacherService {

    @Autowired
    private TeacherMapper teacherMapper;

    public Integer addCourse(CourseInfo courseInfo){
        return teacherMapper.addCourse(courseInfo);
    }
    public List<CourseInfo> selCourse(CourseInfo courseInfo){
        return teacherMapper.selCourse(courseInfo);
    }

    public Integer delCourse(Integer id){
        return teacherMapper.delCourse(id);
    }

    public Integer updCourse(CourseInfo courseInfo){
        return teacherMapper.updCourse(courseInfo);
    }

    public Integer orcCourse(CourseInfo courseInfo){
        return teacherMapper.orcCourse(courseInfo);
    }

    public List<StudentInfo> selClassStudent(Integer classId){
        return teacherMapper.selClassStudent(classId);
    }
    public Integer addUnit(UnitInfo unitInfo){
        return teacherMapper.addUnit(unitInfo);
    }
    public Integer orcUnit(UnitInfo unitInfo){
        return teacherMapper.orcUnit(unitInfo);
    }
    public Integer updUnit(UnitInfo unitInfo){
        return teacherMapper.updUnit(unitInfo);
    }
    public Integer delUnit(Integer id){
        return teacherMapper.delUnit(id);
    }
    public List<UnitInfo> selUnit(UnitInfo unitInfo){
        return teacherMapper.selUnit(unitInfo);
    }
    public List<LearningInfo> selStudentUnit(LearningInfo learningInfo){
        return teacherMapper.selStudentUnit(learningInfo);
    }
    public Integer evaluate(EvaluationInfo evaluationInfo){
        return teacherMapper.evaluate(evaluationInfo);
    }
    public Integer postTask(LearningInfo learningInfo){
        return teacherMapper.postTask(learningInfo);
    }
    public List<CourseInfo> selMyCourse(Integer loginId){
        return teacherMapper.selMyCourse(loginId);
    }
}
